import request from '@/utils/request'

// 查询公告列表
export function listNotice(query) {
  return request({
    url: '/system/notice/list',
    method: 'get',
    params: query
  })
}
// 删除
export function deleteNotice(params) {
  return request({
    url: `/system/notice/${params.noticeId}`,
    method: 'delete',
  })
}

// 置顶
export function putNotice(data) {
  return request({
    url: `/system/notice/setTop`,
    method: 'post',
    data: data
  })
}

// 修改公告
export function updateNotice(data) {
  return request({
    url: '/system/notice',
    method: 'put',
    data: data
  })
}